import mixin from './mixin.js'
import Base from '@/utils/base.js'
import * as filters from '@/filters/index'; // 全局过滤器
import directives from '@/utils/directive/index.js'

const install = (Vue) => {
	Vue.mixin(mixin);
	// 注册全局实用程序过滤器（register global utility filters）.
	Object.keys(filters).forEach(key => {
		Vue.filter(key, filters[key]);
	});

	// 注册全局自定义指令
	Object.keys(directives).forEach(key => {
		Vue.directive(key, directives[key]);
	});
}
export default {
	install
}